package com.xique.client.api;

import com.xique.client.api.factory.RemoteClientUserFallbackFactory;
import com.xique.client.api.model.LoginClientUser;
import com.xique.common.core.constant.ServiceNameConstants;
import com.xique.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 用户服务
 * 
 * @author xique
 */
@FeignClient(contextId = "remoteClientUserService", value = ServiceNameConstants.CLIENT_BIZ_SERVICE, fallbackFactory = RemoteClientUserFallbackFactory.class)
public interface RemoteClientUserService
{
    /**
     * 通过用户名查询用户信息
     *
     * @param username 用户名
     * @return 结果
     */
    @GetMapping(value = "user/info/{username}")
    public R<LoginClientUser> getUserInfo(@PathVariable("username") String username);
}
